<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>ajax</title>
</head>

<body>
    <div class="main">

    </div>


    <button onclick="ajax()">
        ajax
    </button>


    <button onclick="test()">
        test
    </button>
    <script src="./jquery3.5.min.js"></script>

    <script>
        function ajax() {
            $.ajax({
                type: "POST",
                async: true, // 设置同步方式  false代表异步，true代表同步
                url: 'http://localhost:3000/test',
                data: { status: 'time' },
                success: function (result) {

                },
                error: function (error) {
                    
                }
            });
        }


        function test() {
            console.log(1);
        }

    </script>


</body>

</html>